import java.util.Scanner;

/**
 * @License: (C) Copyright 2013-2022
 * @Contact: abcque@outlook.com
 * @IDE: IntelliJ IDEA
 * @Encoding: utf-8
 * @Project: st2214 2215
 * @Package: PACKAGE_NAME
 * @File: SeasonV2.java
 * @Time: 2022/11/29 10:42
 * @Author: abcque
 * @Description: 将月份转换为对应的季节
 * @Modifier:
 * @ModifyDate:
 * @ModifyRemark:
 */
public class SeasonV2 {
    public static void main(String[] args) {
        // step1、定义月份变量 month
        int month;

        // step2、通过控制台输入月份
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要转换的月份: ");
        month = scanner.nextInt();

        // step3、利用规则，转成季节
        switch (month) {
            case 12:
            case 1:
            case 2:
                System.out.println(month + " 月是冬季");
                break;
            case 3:
            case 4:
            case 5:
                System.out.println(month + " 月是春季");
                break;
            case 6:
            case 7:
            case 8:
                System.out.println(month + " 月是夏季");
                break;
            case 9:
            case 10:
            case 11:
                System.out.println(month + " 月是秋季");
                break;
            default:
                System.out.println("输入的月份不存在");
                break;
        }
    }
}
